package text_file_processing;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import org.apache.log4j.Logger;
import parts_of_sentence.Text;

public class Main {
	public static final Logger LOG = Logger.getLogger(Main.class);

	public static void main(String[] args) throws IOException {
		LOG.info("Read text, parsing it");
		Text article = new Text(TextReader.getText(
				"src/main/resources/for_example.txt").toString());

		article.deleteWordsByLength(2);

		BufferedWriter out = new BufferedWriter(new FileWriter(
				"src/main/resources/for_example11.txt"));

		out.write(article.collectText());

		out.close();
	}

}
